//
//  AppDelegate.m
//  customTabBar
//
//  Created by kingboyrang on 2021/5/2.
//  Copyright © 2021 wulanzhou. All rights reserved.
//

#import "AppDelegate.h"
#import "BaseTabBarController.h"
#import "BarItemModel.h"
#import "ZpViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = UIColor.whiteColor;
    
    BaseTabBarController *tabBarController = [[BaseTabBarController alloc] init];
    tabBarController.items = [self getTabBarItemList];
    self.window.rootViewController = tabBarController;
    
    [self.window makeKeyAndVisible];
    
    return YES;
}

- (NSArray *)getTabBarItemList{
    
    NSMutableArray *arr = [NSMutableArray arrayWithCapacity:0];
    
    UIColor *norTxtColor = [UIColor colorFromHexRGB:@"4CAF50"];
    UIColor *selTxtColor = [UIColor whiteColor];
    
    BarItemModel *itemModel = [[BarItemModel alloc] init];
    itemModel.title = @"早盘资讯";
    itemModel.normalColor = norTxtColor;
    itemModel.selectedColor = selTxtColor;
    itemModel.selectedImage = @"zp_sel";
    itemModel.normalImage = @"zp_nor";
    itemModel.viewController = [[ZpViewController alloc] init];
    [arr addObject:itemModel];
    
    itemModel = [[BarItemModel alloc] init];
    itemModel.title = @"价投";
    itemModel.normalColor = norTxtColor;
    itemModel.selectedColor = selTxtColor;
    itemModel.selectedImage = @"worth_sel";
    itemModel.normalImage = @"worth_nor";
    itemModel.viewController = [[UIViewController alloc] init];
    [arr addObject:itemModel];
    
    itemModel = [[BarItemModel alloc] init];
    itemModel.title = @"诊股";
    itemModel.normalColor = norTxtColor;
    itemModel.selectedColor = selTxtColor;
    itemModel.selectedImage = @"diag_sel";
    itemModel.normalImage = @"diag_nor";
    itemModel.viewController = [[UIViewController alloc] init];
    [arr addObject:itemModel];
    
    itemModel = [[BarItemModel alloc] init];
    itemModel.title = @"业绩预告";
    itemModel.normalColor = norTxtColor;
    itemModel.selectedColor = selTxtColor;
    itemModel.selectedImage = @"achieve_sel";
    itemModel.normalImage = @"achieve_nor";
    itemModel.viewController = [[UIViewController alloc] init];
    [arr addObject:itemModel];
    
    return arr;
}





@end
